<template>
    <div>
        setting
        <button @click="goHome">home</button>
        <div>
            {{ testCount }}
        </div>
        <button @click="lessCount">less</button>
    </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { settingStore } from '@renderer/store/setStore'
import { storeToRefs } from 'pinia'
const { ipcRenderer } = require('electron')
const setStoreData = settingStore()
const { testCount } = storeToRefs(setStoreData)
const router = useRouter()
const goHome = () => {
    router.push('/home')
}
const lessCount = () => {
    setStoreData.lessCount()
    ipcRenderer.send('update-storage', JSON.stringify(setStoreData.$state),'setStoreData')
}
</script>

<style scoped lang="scss"></style>